#ifndef CUBE_CAMERA_H_
#define CUBE_CAMERA_H_

class Actor;

class Camera : public Fundamental::Object
{
DECLARE_RTTI( Camera, Fundamental::Object )
public :
	Camera( const std::string& name, bool fixPosition, bool fixYawPitchRoll );
	virtual ~Camera();

	virtual void			OnLButtonPushed() = 0;
	virtual void			OnLButtonReleased() = 0;
	virtual void			OnMouseMoved( int dx, int dy ) = 0;
	virtual void			OnRButtonPushed() = 0;
	virtual void			OnRButtonRelease() = 0;
	virtual void			OnWheelScrolled( int delta ) = 0;

	virtual D3DXVECTOR3		GetPosition() = 0;
	virtual D3DXMATRIX		GetProjectionMatirx() = 0;
	virtual D3DXMATRIX		GetViewMatrix() = 0;
	virtual D3DXVECTOR3		GetViewVector() = 0;

	virtual void			SetPosition( const D3DXVECTOR3& pos ) = 0;
	virtual void			SetViewVector( const D3DXVECTOR3& view ) = 0;

	void					FixPosition(){ _isPositionFixed = true; }
	void					FixYawPitchRoll(){ _isYawPitchRollFixed = true; }
	bool					IsPositionFixed(){ return _isPositionFixed; }
	bool					IsYawPitchRollFixed(){ return _isYawPitchRollFixed; }

	virtual Actor*			GetObjectiveTarget(){ return _objectiveTarget; }
	virtual Actor*			GetSubjectiveTarget(){ return _subjectiveTarget; }

	virtual void			SetObjectiveTarget( Actor* target ){ _objectiveTarget = target; }
	virtual void			SetSubjectiveTarget( Actor* target ){ _subjectiveTarget = target; }

private :
	Actor*					_objectiveTarget;
	Actor*					_subjectiveTarget;

	bool					_isPositionFixed;
	bool					_isYawPitchRollFixed;
};

#endif